Skip to content

[pull] main from MetaMask:main#578

Merged
pull[bot] merged 23 commits into
Reality2byte:mainfrom
MetaMask:main
Mar 5, 2026
Merged

[pull] main from MetaMask:main#578
pull[bot] merged 23 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Mar 5, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

zone-live and others added 23 commits March 5, 2026 11:46
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Makes Trade button sticky at the bottom of the screen.

<img width="366" height="347" alt="Screenshot 2026-03-05 at 10 29 57"
src="https://github.com/user-attachments/assets/871f6692-3f2a-4913-b437-ea1b4c28e4ea"
/>

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Primarily UI layout/typography adjustments in the Market Insights
screen; low risk aside from potential spacing/regression on different
device safe-area insets.
> 
> **Overview**
> Moves the **Trade** CTA (and disclaimer) out of the `ScrollView` into
a fixed bottom footer with safe-area-aware padding, and updates the
`ScrollView` padding/styling accordingly.
> 
> Tweaks Market Insights typography and spacing (headline size, trend
item title style, tweet card text emphasis) and refines source list row
alignment/icon placement; updates skeleton bottom padding to match the
new layout.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
76fe665. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…27017)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
This PR marks the first phase of the page object migration to the
Unified Approach. The old `screen-object` files were not removed,
they'll be removed with the migration of the spec files.

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry:

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MMQA-1470

## **Manual testing steps**
N/A

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**
N/A
<!-- [screenshots/recordings] -->

### **After**
N/A
<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Moderate risk because it changes shared test-framework primitives
(`encapsulatedAction`, `PlaywrightGestures`) and refactors core page
objects, which may cause CI e2e failures/flakiness across Detox vs
Appium paths.
> 
> **Overview**
> Migrates `LoginView` and parts of `WalletView` to the unified
page-object approach by switching element getters to `encapsulated()`
and actions to `UnifiedGestures`, plus adding an Appium-only
`waitForScreenToDisplay()` and a new Appium balance stabilization poller
that handles iOS vs Android differently.
> 
> Updates the unified-gestures migration docs and relaxes
`encapsulatedAction()` so `detox`/`appium` branches are optional,
throwing a clear error when the active framework has no matching branch.
Adds `PlaywrightGestures.terminateApp()` and introduces an
`OnboardingSelectorText.UNLOCK_BUTTON` string used for Appium text-based
matching, while marking legacy WDIO screen-object methods as migrated
via comments.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
b857ced. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…sion CTA (#27015)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
Fixes off center "Buy/Get mUSD" button for primary mUSD conversion CTA
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: fixed off center "Buy/Get mUSD" button for primary mUSD
conversion CTA


## **Related issues**

Fixes: [MUSD-379: Get mUSD CTA button off center in long token
list](https://consensyssoftware.atlassian.net/browse/MUSD-379)

## **Manual testing steps**

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->
<img width="506" height="356" alt="image"
src="https://github.com/user-attachments/assets/c686cef6-e1c6-46d3-9454-5046687d03a5"
/>


### **After**

<!-- [screenshots/recordings] -->
<img width="506" height="356" alt="image"
src="https://github.com/user-attachments/assets/48406dc7-12c7-4170-bf15-08198f76ce87"
/>

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk UI-only tweak that applies an existing `styles.button` rule
to the CTA `Button` to correct alignment; no business logic or data flow
changes.
> 
> **Overview**
> Fixes the primary mUSD conversion asset-list CTA layout by applying
`styles.button` to the `Button`, centering the “Buy/Get mUSD” button
within the row for long token lists.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
7b9c215. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This PR addresses design bugs in the `Send > Review` page to polish the
UI. It improves the overall balance, vertical rhythm and elevations of
the screen.


## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: Transaction confirmation and login screen design polish

  Scenario: user sees updated spacing and styling on confirmation and unlock screens
    Given the user is in the transaction confirmation flow or the login (unlock) flow

    When the user views the Review (confirmation) or Login screen
    Then layout and typography match the updated design (spacing, radii, colors, and component usage)
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

### **After**

<img width="805" height="816" alt="Screenshot 2026-03-04 at 8 21 34 PM"
src="https://github.com/user-attachments/assets/5b252fab-0aac-4f9d-a426-2df9a9d9976f"
/>

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk UI-only changes (spacing/radii/colors) plus snapshot updates;
no transaction logic or data handling is modified.
> 
> **Overview**
> Polishes the confirmation/review screens’ visual rhythm by increasing
section `borderRadius`/`marginBottom`, tweaking `from-to-row`
paddings/separators, and adding top padding to the hero amount text.
> 
> Updates the gas fee token pill styling (muted background, larger
radius/padding) and refines the hero row skeleton layout (wrapper
padding and smaller avatar skeleton), with corresponding Jest snapshot
updates for Earn deposit/withdrawal confirmations.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
98792d1. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

remove redundant renewSeedlessControllerRefreshTokens call in
syncPasswordAndUnlockWallet
remove redundant attemptMultichainAccountWalletDiscovery call in
rehydrate

renewSeedlessControllerRefreshTokens is called in loginVaultCreation
attemptMultichainAccountWalletDiscovery is called in
postLoginAsyncOperations

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches seedless login/rehydration and password-sync paths; while the
diff is small, it can affect OAuth token refresh timing and when
multichain accounts are discovered after recovery.
> 
> **Overview**
> Simplifies seedless rehydration by importing additional mnemonics
without collecting their `EntropySourceId`s and kicking off
`attemptMultichainAccountWalletDiscovery` for each one.
> 
> Removes the post-`changePassword` call to
`renewSeedlessControllerRefreshTokens` in `syncPasswordAndUnlockWallet`,
relying on the existing renewal during normal seedless unlock instead.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
aca702f. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This PR fixes spacing and color issues, improving the polish of the
Unlock page. It refines the vertical rhythm of the screen so that the
components are more balanced.

Designs have been reviewed by @andrewjcohen 

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: Login and wallet ready screen layout and typography

  Scenario: user sees updated login and wallet-ready screens
    Given the user is in the login flow or has just finished wallet setup
    When the user views the Login screen
    Then the MetaMask logo uses 60px top and bottom margin
    And the Unlock button has reduced top margin and the Forgot password link uses default text color with top padding
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

### **After**

<img width="774" height="797" alt="Screenshot 2026-03-03 at 9 44 32 PM"
src="https://github.com/user-attachments/assets/bbdc6b80-ede4-4c39-bf3c-630efbe1cff9"
/>


## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk visual-only changes (spacing, padding, and text
color/typography) on the Login/Unlock screen plus corresponding snapshot
updates.
> 
> **Overview**
> **Polishes the Login/Unlock screen layout and typography.** The
MetaMask logo spacing is adjusted (top/bottom margins), and the primary
unlock button’s top margin is reduced for tighter vertical rhythm.
> 
> The “Forgot password?” link is restyled by adding top padding and
rendering its label with design-system `Text` using the *alternative*
text color/weight, with Jest snapshots updated accordingly.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1cf1c77. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…d during intentional reconnects (#27034)

## **Description**

The WebSocket health toast hook had two bugs:

1. **Spurious offline toast on mount**: The subscription fires
immediately with the controller's current internal state
(BehaviorSubject-style). A `Disconnected` or `Connecting` initial value
would schedule an offline banner even during normal startup when the WS
hadn't had a chance to connect yet. Fix: treat the first callback as a
state snapshot and skip all toast logic — real state transitions will
trigger the banner.

2. **Retry dismiss lag**: Pressing Retry triggered a `Connecting`
transition, but the offline toast stayed visible for the full 1 s
flicker-prevention delay before updating. Fix: call `hide()` immediately
when entering `Connecting` so the user gets instant visual feedback.

3. Spurious toasts during intentional reconnects
(account/network/provider switch): When the user switches accounts
or networks, PerpsConnectionManager tears down the old WebSocket and
opens a new one. This emitted
Disconnected/Connecting WS state events, causing the offline banner and
"live data connected" toast to appear for
user-initiated actions. Fix: set isDisconnecting=true in
performReconnection() during the teardown phase, then read
it synchronously from the singleton inside the subscription callback (no
React render cycle delay) and latch it in
a ref so the Connected handler can also suppress the "back online"
toast.

## **Changelog**

CHANGELOG entry: suppress spurious offline/reconnecting toasts on mount
and during intentional reconnects

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2632

## **Manual testing steps**

\`\`\`gherkin
Feature: WebSocket health toast

  Scenario: user opens Perps tab with healthy connection
    Given the app is running and WebSocket connects normally
    When user navigates to Perps
    Then no offline toast appears

  Scenario: user experiences a disconnection
    Given the user is on the Perps tab
    When the WebSocket disconnects (e.g. airplane mode)
    Then an offline toast appears after ~1 second

  Scenario: user presses Retry on the offline toast
    Given the offline toast is visible
    When user taps Retry
Then the toast dismisses immediately and a reconnecting banner appears
after a short delay

  Scenario: connection restores
    Given the reconnecting banner is visible
    When the WebSocket reconnects successfully
    Then a "back online" toast appears and auto-dismisses
\`\`\`

## **Screenshots/Recordings**

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->


https://github.com/user-attachments/assets/e0cfdef3-8b21-4e5e-8048-f5b305985292


## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.




<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches Perps WebSocket connection-state handling and auto-retry/toast
suppression logic, which could inadvertently hide real outage signals or
change reconnect behavior. Scope is contained to Perps UI feedback and
an `isDisconnecting` flag during reconnection.
> 
> **Overview**
> Prevents **spurious WebSocket health toasts** by treating the first
`subscribeToConnectionState` callback as a snapshot (no
offline/connecting banners or auto-retry until an actual transition
occurs).
> 
> Adds **intentional reconnect suppression**:
`PerpsConnectionManager.performReconnection()` now toggles
`isDisconnecting`, and `useWebSocketHealthToast` reads/latches it to
skip offline/reconnecting/back-online toasts and auto-retry during
account/network/provider switches.
> 
> Improves retry UX by calling `hide()` immediately on `Connecting`
(while still delaying the reconnecting banner to avoid flicker), and
updates/expands tests to cover snapshot behavior, suppression, and
auto-retry cancellation.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
11b2f8d. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR is part of a series to remove the legacy code after BIP-44 was
shipped, several components, hooks, views, etc. still uses the remote
feature flag for BIP-44 causing an unnecessary overcomplexity that can
be easily removed.

The changes include updating the wallet selector.

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MUL-1474

## **Manual testing steps**

Not applicable

## **Screenshots/Recordings**

Not applicable

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes selector behavior to return wallets regardless of the
multichain/BIP-44 remote flag, which could affect any remaining code
paths that still rely on the flag being able to hide wallets. Scope is
small and covered by updated unit tests.
> 
> **Overview**
> Removes the multichain/BIP-44 remote feature-flag dependency from
`selectWallets`, so it now always returns wallets from
`AccountTreeController` when present (instead of returning `[]` when the
flag is off).
> 
> Updates `wallets.test.ts` accordingly by deleting the flag-disabled
test cases and simplifying mock state setup to no longer include
`RemoteFeatureFlagController` data.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
56eddb5. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…7049)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Fixes:

## **Manual testing steps**

no manual testing steps

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches hardware wallet connection state/adapter selection logic; a
stale or mis-synced ref could cause connecting with the wrong adapter
type or inconsistent connection state, though the change is small and
localized.
> 
> **Overview**
> Ensures hardware-wallet connection flow uses a synchronously updated
`targetWalletType` by introducing `targetWalletTypeRef` in
`useHardwareWalletStateManager` and wiring `setTargetWalletType` through
a sync setter that updates both state and the ref.
> 
> Updates `useDeviceConnectionFlow.ensureDeviceReady` to prefer
`refs.targetWalletTypeRef.current` when choosing the adapter type,
clears the ref during `resetState`, and adjusts `useDeviceEventHandlers`
tests to include the new ref in mocked `HardwareWalletRefs`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d445c8f. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR is part of a series to remove the legacy code after BIP-44 was
shipped, several components, hooks, views, etc. still uses the remote
feature flag for BIP-44 causing an unnecessary overcomplexity that can
be easily removed.

The change includes updating the dapp connection code.

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MUL-1465

## **Manual testing steps**

Not applicable

## **Screenshots/Recordings**

Not applicable

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes the dapp connection and permissions sheets to always use the
multichain implementations, removing feature-flag-based fallbacks; this
could impact connection flows if any users still relied on the legacy
screens. Risk is mitigated by being a straightforward routing refactor
with deletions only.
> 
> **Overview**
> Removes the feature-flagged wrapper components that switched between
legacy and “state2” multichain flows for dapp connection and account
permissions.
> 
> `Routes.SHEET.ACCOUNT_CONNECT` now always renders
`MultichainAccountConnect`, and `Routes.SHEET.ACCOUNT_PERMISSIONS`
always renders `MultichainAccountPermissions`. The obsolete wrappers and
their unit tests (`State2AccountConnectWrapper*`,
`BIP44AccountPermissionWrapper*`) are deleted.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2856a2b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…r addTraitsToUser() in useAnalytics (#26807)

## **Description**

Part of the analytics cleanup workstream (#26686).

Adds `identify()` as the canonical method name to `UseAnalyticsHook` and
its implementation, keeping `addTraitsToUser` as a `@deprecated` alias.
No consumers are touched — this purely extends the `useAnalytics`
interface to unblock Phase C/D/F PRs renaming consumers incrementally
without breaking changes.

`useMetrics` and `MetaMetrics` files are intentionally not modified as
they are deleted once all consumers have migrated.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Refs: #26808

## **Manual testing steps**

```gherkin
Feature: analytics cleanup

  Scenario: app builds and tests pass after adding identify alias
    Given the app compiles without TypeScript errors
    When unit tests are run on affected files
    Then all 16 tests pass with no regressions
```

## **Screenshots/Recordings**

### **Before**

N/A — no UI changes.

### **After**

N/A — no UI changes.

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Runtime change is additive and backward-compatible (new `identify()`
plus deprecated `addTraitsToUser()` alias). Most touched files are unit
tests and test setup, so risk is mainly around test stability rather
than app behavior.
> 
> **Overview**
> **Adds `identify()` to `useAnalytics` as the canonical user-traits
API**, while keeping `addTraitsToUser()` as a deprecated alias; updates
the hook type, implementation, and unit tests to cover both entry
points.
> 
> **Refactors analytics mocking across the test suite** by introducing
`createMockUseAnalyticsHook()` in `analyticsMock.ts` and updating many
component tests plus `testSetup.js`/`useAnalytics` Jest mocks to use
this factory instead of bespoke inline mock objects.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4da4d00. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Adds `DIGEST_API_URL` to `builds.yml` so main-prod uses the production
Digest API endpoint while all other builds use the dev endpoint. The
envs that don't have the endpoint specified automatically inherit the
prod one:

- `_public_envs` is set to the production URL
(https://digest-api.api.cx.metamask.io/api/v1) as the default, which is
inherited by main-prod, main-beta, main-rc and qa-prod.
- All other builds (dev, test, e2e, exp, flask, qa) explicitly override
to the dev URL
- Local development continues to use the dev URL as well

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk config-only change, but an incorrect URL would route builds
to the wrong Digest backend and could break related features at runtime.
> 
> **Overview**
> Adds `DIGEST_API_URL` to `builds.yml` so production-like builds
inherit the production Digest endpoint via `*_public_envs`.
> 
> Updates non-prod build variants (`main-*` test/e2e/exp/dev, `flask-*`
test/e2e/dev, and `qa-dev`) to explicitly use the dev Digest endpoint.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
7ac4c44. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…nd update navigation options (#26991)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

**Reason for the change:** The new network form (NetworkDetailsView)
used from Network Management was not used when adding or editing a
network from the legacy network selector. Users opening "Add a custom
network" or editing a network from the old selector still saw the old
NetworkSettings form.

**Improvement:**  
1. **Routing:** The "Add a custom network" and "Edit network" flows from
the old network selector (NetworkSelector, CustomNetworkSelector,
NetworkManager) now open the new network form (NetworkDetailsView) via
the existing `ADD_NETWORK` / `EDIT_NETWORK` routes.
2. **Presentation:** AddNetworkFlow was updated so the new form is the
only content: the inner stack has `headerShown: false` (no extra
header/back above the form), and the modal screens use `cardStyle: {
flex: 1, backgroundColor: white }` so the form fills the modal.
3. **Cleanup:** The old network form (NetworkSettings) and its
dependencies (RpcUrlInput, withIsOriginalNativeToken, styles, tests,
snapshots) were removed as they are no longer referenced.

**Context:** AddNetworkFlow in `App.tsx` still wraps a single screen in
a Stack.Navigator; only the component was switched from NetworkSettings
to NetworkDetailsView and the stack/screen options were adjusted for
full-screen, single-header UX.

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: Added support for the new network form when adding or
editing a custom network from the network selector; removed the legacy
network settings form and related code.

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-522

## **Manual testing steps**

```gherkin
Feature: Add/Edit custom network from network selector

  Scenario: User adds a custom network from the Custom tab
    Given the app is open and the user has opened the network selector (e.g. from wallet header)
    When the user taps the "Custom" tab and then "Add a custom network"
    Then the new network form (NetworkDetailsView) opens full screen in the modal with only the form's header and back button

  Scenario: User edits an existing custom network from the network selector
    Given the app is open, network UI redesign is enabled, and the user has opened the network selector
    When the user selects a custom network and taps "Edit"
    Then the new network form opens for that network with only the form's header and back button

  Scenario: User adds a custom network from Network Manager
    Given the user is in Settings > Networks (or equivalent path that shows NetworkManager)
    When the user taps "Add custom network"
    Then the new network form opens and saving adds the network as before
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**


https://github.com/user-attachments/assets/5ec27df8-bec0-4ba2-b9be-a5345bffbf41


<!-- [screenshots/recordings] -->

### **After**


https://github.com/user-attachments/assets/e39a82b8-d123-4ec5-982e-4a3432adcc99


<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes the add/edit network navigation flow and modal presentation,
which can affect critical UX paths for adding or updating custom
networks. Risk is mitigated by being mostly routing/UI wiring, but
regressions could block network management or cause unexpected modal
layout/gestures.
> 
> **Overview**
> **Network add/edit from the legacy selector is now wired to the
redesigned form.** `AddNetworkFlow` now renders `NetworkDetailsView`
(instead of `NetworkSettings`) and hides the inner stack header.
> 
> **Modal presentation was updated** for `Routes.ADD_NETWORK` and
`Routes.EDIT_NETWORK` to use a full-screen card style (flex +
transparent background) with gestures enabled.
> 
> **Cleanup:** removes the legacy `NetworkSettings` screen
implementation plus related helpers (`RpcUrlInput`,
`withIsOriginalNativeToken`), styles, and Jest tests/snapshots.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e653559. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…#27053)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

**Bug fix:** When editing a custom network (e.g. one added from Popular
networks like zkSync Era) and tapping Save, nothing happened. The cause
was passing `replacementSelectedRpcEndpointIndex: -1` to
`NetworkController.updateNetwork` when URL normalization (e.g. http →
https) made the form RPC URL not match any entry in `rpcEndpoints`, so
the controller rejected the update.

- **useNetworkOperations**: Compute a valid index by trying both
corrected and original RPC URL; if neither matches, use
`selectedRpcEndpointIndex` from the form (clamped to a valid range).
Only pass `replacementSelectedRpcEndpointIndex` when it is ≥ 0.

**UX improvement:** In Networks Management, for networks with multiple
RPC URLs, tapping the RPC URL or the down arrow previously opened
network details. It now opens the same RPC selection bottom sheet as in
the Network Selector. Choosing an RPC updates the default RPC for that
network and closes the sheet (no active network switch, no navigation).

- **RpcSelectionModal**: Added optional `onRpcSelectCustom` callback.
When provided (e.g. from Networks Management), the modal calls it and
closes instead of switching active network and navigating to wallet.
- **NetworksManagementView**: Renders `RpcSelectionModal`, wires
`onTextClick` on the network cell (when `hasMultipleRpcs`) to open it,
and passes `onRpcSelectCustom` that updates `defaultRpcEndpointIndex`
via `NetworkController.updateNetwork`.

**Tests:** RpcSelectionModal test for `onRpcSelectCustom` path;
useNetworkOperations test that the update path passes a valid
`replacementSelectedRpcEndpointIndex`.

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: Fixed saving network details for custom networks (e.g.
added from Popular list) when the Save button had no effect

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-531
https://consensyssoftware.atlassian.net/browse/TMCU-530

## **Manual testing steps**

```gherkin
Feature: Network details save and RPC selection in Networks Management

  Scenario: Save works for custom network (e.g. zkSync Era) after editing name
    Given the user has added a network from Popular networks (e.g. zkSync Era)
    When the user opens that network in Network details and changes the network name
    And the user taps Save
    Then the network name is updated and the user is taken back as expected

  Scenario: Multiple RPCs – tapping RPC URL/arrow opens RPC selection sheet
    Given the user has a network with more than one RPC URL (e.g. Ethereum Mainnet with multiple endpoints)
    When the user is on Settings → Networks (Networks Management)
    And the user taps the RPC URL or down arrow for that network
    Then the RPC selection bottom sheet opens (same as in Network Selector)
    And the user can select a different RPC; the default updates and the sheet closes
    And the user remains on Networks Management (no navigation to wallet)

  Scenario: Tapping the main row still opens network details
    Given the user is on Settings → Networks
    When the user taps the network name/row (not the RPC URL area)
    Then the Network details screen opens as before
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**


https://github.com/user-attachments/assets/47fb2146-730b-48a7-a2a9-5e8daadd63f7


<!-- [screenshots/recordings] -->

### **After**


https://github.com/user-attachments/assets/36299d69-a982-4b3d-a2f1-9d2118d54005


<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes the editability gating for network details, which can disable
Save and inputs if a network is classified as built-in;
misclassification would block editing but does not impact security or
funds.
> 
> **Overview**
> **Network Details editability is now consistently enforced.**
`NetworkDetailsView` disables the Save action when `form.editable ===
false`, and the Network Name/Symbol inputs are also disabled when the
network is non-editable.
> 
> `useNetworkForm` now determines `editable` for RPC-URL entry points by
checking whether the matched network’s `chainId` is one of the built-in
networks (mirroring the network selector rules), and tests were
updated/added to cover built-in vs custom networks opened via RPC URL.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
037a1a2. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
Wrap `request.body.getText()` calls in try-catch blocks to fix flaky
`swap-action-smoke` test failures.

The `swap-action-smoke` test was failing due to unprotected
`request.body.getText()` calls in `MockServerE2E.ts` (lines 429 and
439). These calls would throw "Aborted" errors when the app's bridge
controller cancelled an in-flight request, causing Jest to catch
unhandled rejections. Wrapping these calls in try-catch blocks and
returning a 499 response on abort prevents the errors from propagating.

---
[Slack
Thread](https://consensys.slack.com/archives/C02U025CVU4/p1772698032863329?thread_ts=1772698032.863329&cid=C02U025CVU4)

<p><a
href="https://cursor.com/agents/bc-78dd627e-2976-56c5-b272-275d5c3c1a2c"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-78dd627e-2976-56c5-b272-275d5c3c1a2c"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</p>


<!-- CURSOR_AGENT_PR_BODY_END -->

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cmd-ob <cmd-ob@users.noreply.github.com>
## **Description**

Since the field '### Error messages or log output' is not present in
Jira, we no longer want to make it a mandatory requirement to recognize
the bug report template in GitHub.

Thanks to this change, the issues created by **issuebridge** app (which
replicates on GitHub the tickets we create in Jira), should be
recognized as bug reports by our GitHub Actions.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

NA

## **Manual testing steps**

NA

## **Screenshots/Recordings**

NA

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: only changes the GitHub template-title matcher for bug
reports by removing one required heading, which may slightly broaden
what issues are auto-labeled as bug reports.
> 
> **Overview**
> Bug report issue template detection is relaxed by dropping the `###
Error messages or log output` section from
`bugReportIssueTemplateTitles` in `.github/scripts/shared/template.ts`.
> 
> This allows issues missing that heading (e.g., synced from Jira) to
still match the bug report template and be processed by the existing
labeling workflow.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2dfba67. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…uy (#27058)

## **Description**

When a user taps "Buy" on the empty state token row (`PopularTokenRow`),
the `Ramps Button Clicked` analytics event was not being fired. This PR
adds a `useRampsButtonClickedEvent` hook that encapsulates all the
required event properties -- including feature-flag-dependent
`ramp_type` (BUY / UNIFIED_BUY / UNIFIED_BUY_2), authentication status,
order count, ramp routing, and geolocation region -- following the same
pattern used by `BalanceEmptyState` and `FundActionMenu`.

The hook is placed in the Tokens Section hooks folder since the event
property values depend on feature flags that may change independently.

## **Changelog**

CHANGELOG entry: Fixed missing Ramps Button Clicked analytics event when
tapping Buy on the homepage token empty state

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-499

## **Manual testing steps**

```gherkin
Feature: Ramps Button Clicked analytics on token empty state

  Scenario: user taps Buy on a popular token row
    Given user has a zero-balance account on the homepage
    And the Tokens section shows popular tokens with Buy buttons

    When user taps the Buy button on any token row
    Then the Ramps Button Clicked event fires with correct properties
    And the buy flow opens normally
```

## **Screenshots/Recordings**

N/A -- no UI changes, analytics-only fix.

### **Before**

Tapping Buy on the empty state token row did not fire the `Ramps Button
Clicked` event.

### **After**

Tapping Buy fires `Ramps Button Clicked` with `button_text`, `location`,
`ramp_type`, `region`, `ramp_routing`, `is_authenticated`,
`preferred_provider`, and `order_count`.

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: changes are limited to emitting an additional analytics
event on the Tokens empty-state Buy action and adding unit tests, with
no changes to the buy navigation flow.
> 
> **Overview**
> Fixes missing `RAMPS_BUTTON_CLICKED` analytics when tapping **Buy** on
the homepage Tokens empty-state row by calling a new
`useRampsButtonClickedEvent` hook before `goToBuy`.
> 
> Adds `useRampsButtonClickedEvent` to encapsulate event building
(including feature-flag-driven `ramp_type`, region, and ramp/auth/order
properties), exports it from the Tokens hooks index, and introduces unit
tests for both the hook and the `PopularTokenRow` buy interaction.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
67e8fe7. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

Updates ai-controllers package to the latest version.

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: null

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Dependency upgrade changes the `AiDigestController` state shape (adds
`marketOverview`) and updates Market Insights source types, which could
break runtime assumptions if any callers or migrations are missed. UI
tweaks are low risk.
> 
> **Overview**
> Updates **`@metamask/ai-controllers` to `^0.2.0`** (and lockfile deps)
and updates app fixtures/snapshots to include the new
`AiDigestController.marketOverview: null` field.
> 
> Adjusts Market Insights UI to match updated source typing by mapping
articles/tweets to `MarketInsightsSource.type` values `news`/`social`,
and adds minor spacing (`mt-2`) to the Market Insights entry card
pressable.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
946556d. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
This PR aims to fix a flaky flask test where flakiness was being caused
by the framework and the way `typeText` is implemented.
Because this change is only affecting this flask test for now, the
change was done one the test itself and not on the page object until the
actual root cause is found.

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry:

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: changes are limited to an E2E smoke test, adjusting
input/tap timing to reduce flakiness without affecting app runtime
behavior.
> 
> **Overview**
> Improves stability of the name-lookup snap smoke test by replacing
`RedesignedSendView.inputRecipientAddress()` with a direct
`Gestures.replaceText()` to avoid flaky newline/keyboard behavior.
> 
> Adds explicit gesture metadata and a 1s delayed `waitAndTap` when
selecting the recipient domain in advanced details to reduce
animation-related flakiness.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
6d72450. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

> Adds a new tests/docs/ONRAMP-PROVIDER-TESTING.md manual testing guide
for staging on-ramp flows, covering required feature flags, where to
find provider sandbox credentials, step-by-step walkthroughs for Transak
(native) and MoonPay (WebView) checkouts, and basic troubleshooting.
> 
> Updates README.md to link to the new on-ramp provider testing document
under Documentation.

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry:

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]
```

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: documentation-only changes (new markdown guide and README
link) with no runtime, security, or data-handling impact.
> 
> **Overview**
> Adds a new `tests/docs/ONRAMP-PROVIDER-TESTING.md` guide describing
how to manually validate staging on-ramp flows, including required
feature flags, where to find provider sandbox credentials, step-by-step
walkthroughs for Transak (native) and MoonPay (WebView), and
troubleshooting.
> 
> Updates `README.md` to link to this new on-ramp provider manual
testing documentation under **Documentation**.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1b3c081. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

Continues the color-no-hex cleanup in small codeowner batches by
updating the Snaps (`@MetaMask/core-platform`) tests to remove hardcoded
hex color expectations and local hex theme mocks.

This follows the same pattern as the original PR:
- Original reference PR:
#26651
- use shared `mockTheme` from `util/theme`
- assert token-backed theme values (for example
`mockTheme.colors.info.default`) instead of literal hex strings

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes:
Related: #26651

## **Manual testing steps**

```gherkin
Feature: static hex prevention in tests

  Scenario: snaps tests rely on shared theme values
    Given the Snap UI Renderer test suite

    When user runs the updated copyable and link tests
    Then both tests pass without hardcoded hex color values in assertions or local theme mocks
```

## **Screenshots/Recordings**

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Low runtime risk since changes are limited to tests and ESLint config,
but enabling `color-no-hex` as an error for all `app/components/Snaps`
files could surface new lint failures across that folder.
> 
> **Overview**
> **Enables stricter linting for Snaps theming.** ESLint now enforces
`@metamask/design-tokens/color-no-hex` as an *error* for
`app/components/Snaps/**/*`.
> 
> **Updates Snaps tests to use token-backed theme values.** Snap UI
tests (`copyable`, `link`, and `SnapUISpinner`) stop using hardcoded hex
colors/local theme mocks and instead import the shared `mockTheme` and
assert against values like `mockTheme.colors.info.default` /
`mockTheme.colors.primary.default`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
468e216. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description**

Increases the vertical spacing between homepage sections from 24px
(gap=6) to 48px (gap=12) to improve visual separation and match the
updated design spec.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Refs: Homepage section spacing refinement

## **Manual testing steps**

```gherkin
Feature: Homepage section spacing

  Scenario: user views the homepage
    Given user is on the homepage

    When user scrolls through the sections (Tokens, Perpetuals, Predictions, DeFi, NFTs)
    Then each section has 48px of vertical spacing between them
```

## **Screenshots/Recordings**


https://github.com/user-attachments/assets/40c3c900-e687-4ee2-97c2-18e4b93e3a70



https://github.com/user-attachments/assets/53b66cbc-cba5-46d1-9ba2-004f86ef4652




### **Before**

Sections had 24px gap between them.

### **After**

Sections have 48px gap between them.

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk UI-only change that adjusts layout spacing on the homepage;
no business logic, data, or security behavior is affected.
> 
> **Overview**
> Increases the vertical spacing between homepage sections by updating
the `Homepage` container `Box` `gap` from `6` to `12` (24px → 48px),
improving visual separation per the updated design spec.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8f13bab. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…26675)

## **Description**

Adds a lightweight **agentic toolkit** that lets AI agents (and
developers) query and drive the running MetaMask Mobile app in real time
via Metro's Hermes CDP WebSocket — entirely `__DEV__`-gated, zero
production footprint.

Dev workflows are evolving. As we increasingly work with AI agents
writing and iterating on code, the missing piece is **deterministic
verification**: the agent needs to *know* its change worked, not guess.
Unit tests validate logic against mocks; e2e tests validate scripted
happy paths minutes later. Neither gives an agent real-time feedback
against a live running app. This toolkit closes that loop — after every
code change, the agent queries actual device state, measures real
outcomes, and decides whether to commit or iterate.

### What's in this PR

- **CDP bridge** (`scripts/perps/agentic/cdp-bridge.js`) — WebSocket
client that speaks Hermes CDP: navigate, eval, eval-async, state
queries, account management
- **Recipe system** (`scripts/perps/agentic/recipes/perps.json`) —
reusable named CDP expressions per team; any team adds a `<team>.json`
file, no bridge code changes needed
- **Trade flow recipes** — `perps/pre-trade`, `perps/place-order`
(template), `perps/post-trade` for pre/post state comparison around an
order
- **Account management** — `listAccounts`, `getSelectedAccount`,
`switchAccount` via `__AGENTIC__` bridge (no credentials, address-only)
- **`yarn a:*` shortcuts** — `a:start`, `a:stop`, `a:status`,
`a:reload`, `a:navigate` for human discoverability
- **Replaces** `test-trade-flow.sh` (262-line shell script) with
composable recipes

### Adoption is opt-in

This is infrastructure, not a mandate. A larger knowledge-share session
and prompting templates (to automatically give agents the context to use
this loop) are planned as follow-up.

### What's NOT in this PR (follow-up)

- Wallet import/reset automation (SRP/password handling — needs internal
alignment first)
- Prompting templates and agent onboarding guides

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes:

## **Manual testing steps**

```gherkin
Feature: Agentic CDP bridge

  Scenario: agent queries app state
    Given the app is running on iOS Simulator or Android Emulator
    And Metro is running (yarn a:start)

    When agent runs yarn a:status
    Then current route and selected account are returned as JSON

  Scenario: agent runs a recipe
    When agent runs scripts/perps/agentic/app-state.sh recipe perps/pre-trade
    Then position count and balance snapshot are returned

  Scenario: agent lists available recipes
    When agent runs scripts/perps/agentic/app-state.sh recipe --list
    Then all recipes from recipes/*.json are listed

  Scenario: agent navigates to a screen
    When agent runs yarn a:navigate PerpsMarketListView
    Then app navigates to the perps home screen
```

## **Screenshots/Recordings**

### **Before**

<!-- [screenshots/recordings] -->

### **After**


https://github.com/user-attachments/assets/e97c0e85-bf44-48c8-ab2d-541cf31f5190



## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Changes are gated to `__DEV__` and mainly affect developer
tooling/scripts; main risk is breaking dev builds/workflows via the new
`globalThis.__AGENTIC__` account helpers or recipe execution paths.
> 
> **Overview**
> Adds **__DEV__-only agentic automation hooks** by extending the
`globalThis.__AGENTIC__` bridge in `NavigationService` with account
helpers (`listAccounts`, `getSelectedAccount`, `switchAccount`)
alongside existing navigation/state primitives.
> 
> Expands the CDP tooling in `scripts/perps/agentic/` with new
`cdp-bridge.js` commands (`status`, account commands, and `recipe`
support that loads `recipes/*.json`), updates `app-state.sh` to expose
these wrappers, and introduces initial Perps recipes plus a recipes
README.
> 
> Improves ergonomics via new `yarn a:*` shortcuts and updates the
agentic workflow docs, while **removing** the standalone
`test-trade-flow.sh` in favor of recipe-based orchestration.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4045584. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@pull pull Bot locked and limited conversation to collaborators Mar 5, 2026
@pull pull Bot added the ⤵️ pull label Mar 5, 2026
@pull pull Bot merged commit a0da5f1 into Reality2byte:main Mar 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.